# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :fields.py
# @Time      :2022/7/29 16:11
# @Author    :吕华龙
from flask_restful import fields

# 课程的序列化器
course_fields = {
    "id": fields.Integer,
    "name": fields.String,
    "info": fields.String,
    "create_time": fields.DateTime,
    "start_time": fields.DateTime,
    "end_time": fields.DateTime,
    "total_time": fields.Integer,
    "total": fields.Integer,
    "status": fields.Integer,
    "is_top": fields.Integer,
}

# 轮播图的序列化器
channel_fields = {
    "id": fields.Integer,
    "banner_img": fields.String,
    "link_type": fields.Integer,
    "link_content": fields.String
}

# 资讯的序列化器
infor_fields = {
    "id": fields.Integer,
    "thumb_img": fields.String,
    "title": fields.String,
    "click_rate": fields.Integer,
    "created_at": fields.DateTime
}

# 评价的序列化器
appraise_fields = {
    "id": fields.Integer,
    "content": fields.String,
    "create_time": fields.DateTime,
    "teacher_id": fields.Integer,
    "stu_id": fields.Integer,
    "course_id": fields.Integer
}

# 优惠券的序列化器
coupon_fields = {
    "id": fields.Integer,
    "name": fields.String,
    "create_time": fields.DateTime,
    "end_time": fields.DateTime,
    "coupon_num": fields.Integer
}
